package com.xzr.factories;

import com.xzr.spring.impl.American;
import com.xzr.spring.impl.Chinese;

public class FirstFactory {
    public Object doPerson(String citizenship){
        if ("中国人".equals(citizenship)){
            return new Chinese();
        }else if("美国人".equals(citizenship)){
            return new American();
        }
        return null;
    }
}
